<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="apple-touch-icon" sizes="76x76" href="/static/image/logo.png">
    <link rel="icon" type="image/png" href="/static/image/logo.png">
    <title>
        Material Dashboard 2 by Creative Tim
    </title>
    <!--     Fonts and icons     -->
    <link rel="stylesheet" type="text/css"
        href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700" />
    <!-- Nucleo Icons -->
    <link href="/static/assets/css/nucleo-icons.css" rel="stylesheet" />
    <link href="/static/assets/css/nucleo-svg.css" rel="stylesheet" />
    <!-- Font Awesome Icons -->
    <script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
    <!-- Material Icons -->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
    <!-- CSS Files -->
    <link id="pagestyle" href="/static/assets/css/material-dashboard.css?v=3.0.0" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="/static/assets/css/ele-index.css">
    <link rel="stylesheet" href="/static/editormd/css/editormd.css" />
    <style>
        [v-cloak] {
            display: none
        }
    </style>
</head>

<body class="g-sidenav-show bg-gray-200">
    {% verbatim myblock %}
    <div id="app" v-cloak v-loading="loading">
        <!-- 侧边栏 -->
        <aside
            class="sidenav navbar navbar-vertical navbar-expand-xs border-0 border-radius-xl my-3 fixed-start ms-3   bg-gradient-dark"
            id="sidenav-main">
            <div class="sidenav-header">
                <i class="fas fa-times p-3 cursor-pointer text-white opacity-5 position-absolute end-0 top-0 d-none d-xl-none"
                    aria-hidden="true" id="iconSidenav"></i>
                <a class="navbar-brand m-0" href="#" v-if="nick_name === '_'">
                    <img src="/static/image/logo.png" class="navbar-brand-img h-100" alt="main_logo">
                    <span class="ms-1 font-weight-bold text-white">Black White Site</span>
                </a>
                <a class="navbar-brand m-0" href="/pages/personalPage.html" v-if="nick_name !== '_'">
                    <img :src="user_avatar" class="navbar-brand-img h-100" alt="main_logo">
                    <span class="ms-1 font-weight-bold text-white">您好 {{ nick_name}}</span>
                </a>
            </div>
            <hr class="horizontal light mt-0 mb-2">
            <div class="collapse navbar-collapse  w-auto  max-height-vh-100" id="sidenav-collapse-main">
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link text-white bg-gradient-primary" href="#" onclick="toggleSidenav()"
                            style="background: black !important;">
                            <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                                <i class="material-icons opacity-10">close</i>
                            </div>
                            <span class="nav-link-text ms-1">关闭侧边栏</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-white" href="/pages/homePage.html">
                            <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                                <i class="material-icons opacity-10">home</i>
                            </div>
                            <span class="nav-link-text ms-1">社区·圈子</span>
                        </a>
                    </li>

                    <li class="nav-item mt-3">
                        <h6 class="ps-4 ms-2 text-uppercase text-xs text-white font-weight-bolder opacity-8">My Space
                        </h6>
                    </li>
                    <li class="nav-item" v-if="nick_name !== '_'">
                        <a class="nav-link text-white " href="/pages/personalPage.html">
                            <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                                <i class="material-icons opacity-10">person</i>
                            </div>
                            <span class="nav-link-text ms-1">我的主页</span>
                        </a>
                    </li>
                    <li class="nav-item" v-if="nick_name !== '_'">
                        <a class="nav-link text-white" href="/pages/editorBywang.html">
                            <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                                <i class="fa fa-bandcamp" aria-hidden="true"></i>
                            </div>
                            <span class="nav-link-text ms-1">新建文章</span>
                        </a>
                    </li>
                    <li class="nav-item" id="login_aside" v-if="nick_name === '_'">
                        <a class="nav-link text-white " href="/pages/sign-in.html">
                            <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                                <i class="material-icons opacity-10">login</i>
                            </div>
                            <span class="nav-link-text ms-1">登录</span>
                        </a>
                    </li>
                    <li class="nav-item" id="register_aside" v-if="nick_name === '_'">
                        <a class="nav-link text-white " href="/pages/sign-up.html">
                            <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                                <i class="material-icons opacity-10">assignment</i>
                            </div>
                            <span class="nav-link-text ms-1">注册</span>
                        </a>
                    </li>
                    <li class="nav-item" id="logout_aside" v-if="nick_name !== '_'">
                        <a class="nav-link text-white " href="#" @click="logout">
                            <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                                <!-- <i class="material-icons opacity-10">assignment</i> -->
                                <i class="ni ni-user-run"></i>
                            </div>
                            <span class="nav-link-text ms-1">退出登录</span>
                        </a>
                    </li>
                </ul>
            </div>
            <div class="sidenav-footer position-absolute w-100 bottom-0 ">
                <div class="mx-3">

                </div>
            </div>
        </aside>
        <!-- 显示区 -->
        <div class="main-content position-relative bg-gray-100 max-height-vh-100 h-100">
            <!-- Navbar 头部 -->
            <nav class="navbar navbar-main navbar-expand-lg px-0 mx-4 shadow-none border-radius-xl" id="navbarBlur"
                navbar-scroll="true">
                <div class="container-fluid py-1 px-3">
                    <!-- 头部左侧 -->
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb bg-transparent mb-0 pb-0 pt-1 px-0 me-sm-6 me-5">
                            <li class="breadcrumb-item text-sm"><a class="opacity-5 text-dark"
                                    href="javascript:;">Pages</a></li>
                            <li class="breadcrumb-item text-sm text-dark active" aria-current="page">查看文章</li>
                        </ol>
                        <h6 class="font-weight-bolder mb-0">Show Page</h6>
                    </nav>
                    <!-- 头部右侧 -->
                    <div class="collapse navbar-collapse mt-sm-0 mt-2 me-md-0 me-sm-4" id="navbar">
                        <div class="ms-md-auto pe-md-3 d-flex align-items-center">
                            <div class="input-group input-group-outline">
                                <label class="form-label">Type here search</label>
                                <input type="text" class="form-control" disabled>
                            </div>
                        </div>
                        <ul class="navbar-nav  justify-content-end" id="right_ul">
                            <li class="nav-item d-flex align-items-center">
                                <a href="/pages/sign-in.html" class="nav-link text-body font-weight-bold px-0"
                                    v-if="nick_name === '_'">
                                    <i class="fa fa-user me-sm-1"></i>
                                    <span class="d-sm-inline d-none">登录/注册</span>
                                </a>
                            </li>
                            <!-- 侧边栏显示与否 -->
                            <li class="nav-item d-xl-none ps-3 d-flex align-items-center">
                                <a href="javascript:;" class="nav-link text-body p-0" id="iconNavbarSidenav">
                                    <div class="sidenav-toggler-inner">
                                        <i class="sidenav-toggler-line"></i>
                                        <i class="sidenav-toggler-line"></i>
                                        <i class="sidenav-toggler-line"></i>
                                    </div>
                                </a>
                            </li>
                            <li class="nav-item px-3 d-flex align-items-center">
                                <a href="javascript:;" class="nav-link text-body p-0">
                                    <!-- 展示关键 fixed-plugin-button-nav -->
                                    <i class="fa fa-cog fixed-plugin-button-nav cursor-pointer"></i>
                                </a>
                            </li>
                            <li class="nav-item dropdown pe-2 d-flex align-items-center">
                                <a href="javascript:;" class="nav-link text-body p-0" id="dropdownMenuButton"
                                    data-bs-toggle="dropdown" aria-expanded="false">
                                    <i class="fa fa-bell cursor-pointer"></i>
                                </a>
                                <ul class="dropdown-menu  dropdown-menu-end  px-2 py-3 me-sm-n4"
                                    aria-labelledby="dropdownMenuButton">
                                    <li class="mb-2">
                                        <a class="dropdown-item border-radius-md" href="javascript:;">
                                            <div class="d-flex py-1">
                                                <div class="my-auto">
                                                    <img src="/static/assets/img/team-2.jpg"
                                                        class="avatar avatar-sm  me-3 ">
                                                </div>
                                                <div class="d-flex flex-column justify-content-center">
                                                    <h6 class="text-sm font-weight-normal mb-1">
                                                        <span class="font-weight-bold">New message</span> from Laur
                                                    </h6>
                                                    <p class="text-xs text-secondary mb-0">
                                                        <i class="fa fa-clock me-1"></i>
                                                        13 minutes ago
                                                    </p>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <li class="mb-2">
                                        <a class="dropdown-item border-radius-md" href="javascript:;">
                                            <div class="d-flex py-1">
                                                <div class="my-auto">
                                                    <img src="/static/assets/img/small-logos/logo-spotify.svg"
                                                        class="avatar avatar-sm bg-gradient-dark  me-3 ">
                                                </div>
                                                <div class="d-flex flex-column justify-content-center">
                                                    <h6 class="text-sm font-weight-normal mb-1">
                                                        <span class="font-weight-bold">New album</span> by Travis Scott
                                                    </h6>
                                                    <p class="text-xs text-secondary mb-0">
                                                        <i class="fa fa-clock me-1"></i>
                                                        1 day
                                                    </p>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </div>
            </nav>
            <!-- End Navbar -->

            <!-- 正式内容开始 -->
            <div class="row" style="width: 100%; margin: 0;">
                <div class="container-fluid px-2 px-md-4 col-md-10" id="content_area">
                    <!-- 头部图像 -->
                    <div class="page-header min-height-300 border-radius-xl mt-4"
                        style="background-image: url('/static/image/header.gif');">
                        <span class="mask  opacity-6"></span>
                    </div>
                    <!-- 标题 -->
                    <div class="card card-body mx-3 mx-md-4 mt-n6" style="z-index: 2;">
                        <h3 style="word-wrap: break-word;">{{article_title}}</h3>
                        <el-image style="width: 200px; height: 200px" :src="head_avatar" fit="cover"></el-image>
                    </div>

                    <!-- 内容 -->
                    <div class="card card-body mx-3 mx-md-4 mt-n2" style="z-index: 1;">
                        <!-- 标签 -->
                        <div>
                            <label>文章标签： </label>
                            <el-tag v-for="item in tags">{{item}}</el-tag>
                        </div>
                        <div class="centered show_to" id="content">
                            <div id="test-editor">
                                <textarea style="display:none;">
                                </textarea>
                            </div>
                        </div>
                    </div>
                    <div style="text-align: center; margin-top: 10px;">
                        <el-button @click="return_page" type="warning" style="margin-bottom: 20px;">返回</el-button>
                    </div>
                    
                    <!-- 审核相关 -->
                    <div style=" margin-top: 20px;" hidden>
                        <el-form>
                            <el-form-item label="是否满足审查通过的要求">
                                <el-switch v-model="form.is_success"></el-switch>
                            </el-form-item>
                            <el-button @click="check_compeletd" type="info" id="comment_button"
                                style="margin-bottom: 20px;">确定</el-button>
                        </el-form>
                        <el-input type="textarea" :rows="2" placeholder="列出不合理的点 方便用户后续修改" v-model="form.word">
                        </el-input>
                        <br>

                    </div>
                </div>
                <div class="col-md-2" id="content_area_nav" hidden>
                    <nav id="navbar-title"
                        class="navbar navbar-vertical navbar-expand-xs border-0 border-radius-xl my-6 fixed-end ms-3">
                        <h3 class="navbar-brand" href="#">文章索引</h3>
                    </nav>
                </div>
            </div>

            <!-- 正式内容结束 -->
            <!-- 页脚开始 -->
            <footer class="footer py-4  ">
                <div class="container-fluid">
                    <div class="row align-items-center justify-content-lg-between">
                        <div class="col-lg-6 mb-lg-0 mb-4">
                            <div class="copyright text-center text-sm text-muted text-lg-start">
                                ©
                                <script>
                                    document.write(new Date().getFullYear())
                                </script>,
                                made with <i class="fa fa-heart"></i> by
                                <a href="https://www.creative-tim.com" class="font-weight-bold" target="_blank">Creative
                                    Tim</a>
                                for a better web.
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <ul class="nav nav-footer justify-content-center justify-content-lg-end">
                                <li class="nav-item">
                                    <a href="https://www.creative-tim.com" class="nav-link text-muted"
                                        target="_blank">Creative Tim</a>
                                </li>
                                <li class="nav-item">
                                    <a href="https://www.creative-tim.com/presentation" class="nav-link text-muted"
                                        target="_blank">About Us</a>
                                </li>
                                <li class="nav-item">
                                    <a href="https://www.creative-tim.com/blog" class="nav-link text-muted"
                                        target="_blank">Blog</a>
                                </li>
                                <li class="nav-item">
                                    <a href="https://www.creative-tim.com/license" class="nav-link pe-0 text-muted"
                                        target="_blank">License</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </footer>
            <!-- 页脚结束 -->
        </div>
        <!-- 主题样式内容开始 -->
        <div class="fixed-plugin">
            <a class="fixed-plugin-button text-dark position-fixed px-3 py-2">
                <i class="material-icons py-2">settings</i>
            </a>
            <div class="card shadow-lg">
                <div class="card-header pb-0 pt-3">
                    <div class="float-start">
                        <h5 class="mt-3 mb-0">嗨喽~</h5>
                        <p>配置你想要的主题.</p>
                    </div>
                    <div class="float-end mt-4">
                        <button class="btn btn-link text-dark p-0 fixed-plugin-close-button">
                            <i class="material-icons">clear</i>
                        </button>
                    </div>
                    <!-- End Toggle Button -->
                </div>
                <hr class="horizontal dark my-1">
                <div class="card-body pt-sm-3 pt-0">
                    <!-- Sidebar Backgrounds -->
                    <div>
                        <h6 class="mb-0">侧边栏聚焦</h6>
                    </div>
                    <a href="javascript:void(0)" class="switch-trigger background-color">
                        <div class="badge-colors my-2 text-start">
                            <span class="badge filter bg-gradient-primary active" data-color="primary"
                                onclick="sidebarColor(this)"></span>
                            <span class="badge filter bg-gradient-dark" data-color="dark"
                                onclick="sidebarColor(this)"></span>
                            <span class="badge filter bg-gradient-info" data-color="info"
                                onclick="sidebarColor(this)"></span>
                            <span class="badge filter bg-gradient-success" data-color="success"
                                onclick="sidebarColor(this)"></span>
                            <span class="badge filter bg-gradient-warning" data-color="warning"
                                onclick="sidebarColor(this)"></span>
                            <span class="badge filter bg-gradient-danger" data-color="danger"
                                onclick="sidebarColor(this)"></span>
                        </div>
                    </a>
                    <!-- Sidenav Type -->
                    <div class="mt-3">
                        <h6 class="mb-0">侧边栏样式</h6>
                        <p class="text-sm">选择想要的侧边栏样式</p>
                    </div>
                    <div class="d-flex">
                        <button class="btn bg-gradient-dark px-3 mb-2 active" data-class="bg-gradient-dark"
                            onclick="sidebarType(this)">暗黑</button>
                        <button class="btn bg-gradient-dark px-3 mb-2 ms-2" data-class="bg-transparent"
                            onclick="sidebarType(this)">透明</button>
                        <button class="btn bg-gradient-dark px-3 mb-2 ms-2" data-class="bg-white"
                            onclick="sidebarType(this)">白亮</button>
                    </div>
                    <p class="text-sm d-xl-none d-block mt-2">You can change the sidenav type just on desktop view.</p>
                    <!-- Navbar Fixed -->
                    <div class="mt-3 d-flex">
                        <h6 class="mb-0">导航栏固定</h6>
                        <div class="form-check form-switch ps-0 ms-auto my-auto">
                            <input class="form-check-input mt-1 ms-auto" type="checkbox" id="navbarFixed"
                                onclick="navbarFixed(this)">
                        </div>
                    </div>
                    <hr class="horizontal dark my-3">
                    <div class="mt-2 d-flex">
                        <h6 class="mb-0">全局主题[白/黑]</h6>
                        <div class="form-check form-switch ps-0 ms-auto my-auto">
                            <input class="form-check-input mt-1 ms-auto" type="checkbox" id="dark-version"
                                onclick="darkMode(this)">
                        </div>
                    </div>
                    <hr class="horizontal dark my-sm-4">
                    <a class="btn btn-outline-dark w-100" href="">completed welcome blackwhitesite</a>
                </div>
            </div>
        </div>
        <!-- 主题样式内容结束 -->
    </div>
    {% endverbatim myblock %}
    <!--   Core JS Files   -->
    <script src="/static/assets/js/core/popper.min.js"></script>
    <script src="/static/assets/js/core/bootstrap.min.js"></script>
    <script src="/static/assets/js/plugins/perfect-scrollbar.min.js"></script>
    <script src="/static/assets/js/plugins/smooth-scrollbar.min.js"></script>

    <script src="/static/assets/js/my/jquery.js"></script>
    <script src="/static/assets/js/my/vue.min.js"></script>
    <script src="/static/assets/js/my/vue-router.js"></script>
    <script src="/static/assets/js/my/ele.index.js"></script>
    <script src="/static/editormd/lib/marked.min.js"></script>
    <script src="/static/editormd/lib/prettify.min.js"></script>
    <script src="/static/editormd/lib/flowchart.min.js"></script>
    <script src="/static/editormd/lib/jquery.flowchart.min.js"></script>
    <script src="/static/editormd/lib/raphael.min.js"></script>
    <script src="/static/editormd/lib/underscore.min.js"></script>
    <script src="/static/editormd/js/editormd.js"></script>
    <!-- <script src="/static/js/autoBuildTree.js"></script> -->
    <script src="/static/js/ping.js"></script>
    <script src="/static/js/clickEmoji.js"></script>
    <script src="/static/js/cookieUtil.js"></script>


    <script>
        var win = navigator.platform.indexOf('Win') > -1;
        if (win && document.querySelector('#sidenav-scrollbar')) {
            var options = {
                damping: '0.5'
            }
            Scrollbar.init(document.querySelector('#sidenav-scrollbar'), options);
        };
        // window.onresize = function () {
        //     //浏览器窗口的内部宽度（包括滚动条）
        //     var Width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
        //     //浏览器窗口的内部高度（包括滚动条）
        //     var Height = window.innerHeight || document.documentElement.clientWidth || document.body.clientHeight;
        //     if (Width < 1800) {
        //         document.getElementById("content_area").classList.remove("col-md-10");
        //         document.getElementById("content_area").classList.add("col-md-12");
        //         document.getElementById("content_area_nav").setAttribute('hidden', true);
        //     } else {
        //         document.getElementById("content_area").classList.remove("col-md-12");
        //         document.getElementById("content_area").classList.add("col-md-10");
        //         document.getElementById("content_area_nav").classList.add("col-md-2");
        //         document.getElementById("content_area_nav").removeAttribute('hidden');
        //     }
        // }
    </script>
    <!-- Github buttons -->
    <!-- <script async defer src="https://buttons.github.io/buttons.js"></script>
  Control Center for Material Dashboard: parallax effects, scripts for the example pages etc
  <script src="/static/assets/js/material-dashboard.min.js?v=3.0.0"></script> -->

    <script>
        // import foo from '/static/js/AutoBuildTree.js'
        new Vue({
            el: '#app',
            data: {
                click_article: "最新",
                nick_name: localStorage.getItem("nick_name") === null ? '_' : localStorage.getItem("nick_name"),
                user_avatar: localStorage.getItem("avatar") === null ? '_' : localStorage.getItem("avatar"),
                clientHeight: "",
                content: "",
                add_time: "",
                article_title: "",
                loading: true,
                refer: localStorage.getItem('refer'),
                commentList: [],
                token: localStorage.getItem('token') !== null ? localStorage.getItem('token') : "no",
                comment: "",
                reply_user: "",
                reply_cid: "",
                next: null,
                editor: null,
                head_avatar: "",
                form: {
                    is_success: false,
                    word: ""
                },
                aid: "",
                tags: []
            },
            created() {
                // 加载文章
                this.init_article();
            },
            mounted() {
                // 动态禁用元素呗
                this.change_sign_status();
                //浏览器窗口的内部宽度（包括滚动条）
                // var Width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
                // //浏览器窗口的内部高度（包括滚动条）
                // var Height = window.innerHeight || document.documentElement.clientWidth || document.body.clientHeight;
                // if (Width < 1800) {
                //     document.getElementById("content_area").classList.remove("col-md-10");
                //     document.getElementById("content_area").classList.add("col-md-12");
                //     document.getElementById("content_area_nav").setAttribute('hidden', true);
                // } else {
                //     document.getElementById("content_area").classList.remove("col-md-12");
                //     document.getElementById("content_area").classList.add("col-md-10");
                //     document.getElementById("content_area_nav").classList.add("col-md-2");
                //     document.getElementById("content_area_nav").removeAttribute('hidden');
                // }
            },
            watch: {
            },
            methods: {
                return_page() {
                    document.location.href = this.refer || `/pages/homePage.html/`
                },
                check_compeletd() {
                    this.loading = true;
                    if ((!this.form.is_success) && this.form.word.length < 5) {
                        this.$message({
                            message: '请给出整改意见',
                            type: 'warning'
                        });
                        this.loading = false;
                        return
                    }
                    const w = this.form.is_success === true ? "通过" : "驳回"
                    this.$confirm(`确定${w}这篇文章 (审核不严可能导致您失去相应权限)`, '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(() => {
                        this.loading = true;
                        const url = `/apiArticle/superAdmin/?is_valid=${this.form.is_success}&word=${this.form.word}&aid=${this.aid}`;
                        let regexp = /.*csrftoken=([^;.]*).*$/;
                        let xCSRF = document.cookie.match(regexp) === null ? null : document.cookie.match(regexp)[1];
                        let regexp_token = /.*jwtToken=([^;.]*).*$/;
                        let token = document.cookie.match(regexp_token) === null ? null : document.cookie.match(regexp_token)[1];
                        let cid = undefined;
                        fetch(url, {
                            method: 'PUT',
                            headers: {
                                'Content-Type': 'application/x-www-form-urlencoded',
                                'token': token,
                                'X-CSRFToken': xCSRF
                            },
                            body: "",
                        })
                            .then(resp => resp.json())
                            .then(json => {
                                if (json.code !== 200) {
                                    this.$message({
                                        message: json.message,
                                        type: 'warning'
                                    });
                                    this.loading = false;
                                } else {
                                    this.$message({
                                        message: json.message,
                                        type: 'success'
                                    });
                                    document.location.href = this.refer || `/pages/homePage.html`;
                                    this.loading = false;
                                }
                            })
                    }).catch(() => {

                    });
                },
                loadMore() {
                    let button = document.getElementById('more');
                    button.disabled = true;
                    const url = this.next;
                    this.true_comment(url, 'append');
                },
                change_sign_status() {
                    this.nick_name = localStorage.getItem("nick_name") === null ? '_' : localStorage.getItem("nick_name");
                    let self = this;
                    setTimeout(function () {
                        self.loading = false;
                    }, 300)
                },
                logout() {
                    localStorage.removeItem('token');
                    localStorage.removeItem('nick_name');
                    window.clearCookie("jwtToken");
                    this.change_sign_status();
                },
                init_editor() {
                    let self = this;
                    $(function () {
                        this.editor = editormd.markdownToHTML("test-editor", {
                            readOnly: true,
                            watch: true,
                            height: 'auto',
                            toolbar: false,
                            previewTheme: "dark",
                            emoji: true,
                            taskList: true,
                            emoji: true,
                            taskList: true,
                            // tex             : true,  // 默认不解析
                            flowChart: true,  // 默认不解析
                            // sequenceDiagram : true,  // 默认不解析
                        });
                    });

                },
                init_article() {
                    this.aid = localStorage.getItem('checkAid')
                    if (this.aid === null) {
                        this.$alert('没有相关文章', '警告', {
                            confirmButtonText: '确定',
                            callback: action => {
                                document.location.href = this.refer || '/pages/homePage.html/'
                            }
                        })
                        return
                    };
                    let url = `/apiArticle/superAdmin/?aid=${this.aid}`;
                    let regexp = /.*csrftoken=([^;.]*).*$/;
                    let xCSRF = document.cookie.match(regexp) === null ? null : document.cookie.match(regexp)[1];
                    let regexp_token = /.*jwtToken=([^;.]*).*$/;
                    let token = document.cookie.match(regexp_token) === null ? null : document.cookie.match(regexp_token)[1];
                    fetch(url, {
                        method: 'POST',
                        headers: {
                            'token': token,
                            'X-CSRFToken': xCSRF
                        }
                    })
                        .then(resp => resp.json())
                        .then(json => {
                            if (json.code !== 200) {
                                this.$message({
                                    message: json.message,
                                    type: 'warning'
                                });
                            } else {
                                this.content = json.data.text;
                                this.article_title = json.data.title;
                                this.head_avatar = json.data.head_avatar;
                                this.tags = json.data.tags;
                                let self = this;
                                document.getElementById('test-editor').innerHTML = `<textarea id="message" name="message">` + self.content + `</textarea>`
                                this.init_editor();
                            }
                        })
                }
            }
        })
    </script>
    <script async defer src="https://buttons.github.io/buttons.js"></script>
    <!-- Control Center for Material Dashboard: parallax effects, scripts for the example pages etc -->
    <script src="/static/assets/js/material-dashboard.min.js?v=3.0.0"></script>
    <script src="https://myhkw.cn/api/player/1636018876119" id="myhk" key="1636018876119" m="1"></script>

</body>

</html>